#ifndef PROGRESSBAR_H
#define PROGRESSBAR_H

#include <QPainter>
#include <QWidget>

class ProgressBar : public QWidget
{
public:
    ProgressBar(QWidget *parent = nullptr);

    inline void setCurrentValue(int value)
    {
        currentValue = value;
        repaint();  // 更新界面
    }
    inline void setMaxValue(int value)
    {
        maxValue = value;
        repaint();  // 更新界面
    }
protected:
    void paintEvent(QPaintEvent *);
private:
    int currentValue;
    int maxValue;
};
#endif // PROGRESSBAR_H
